using System;
using System.Drawing;
using Core;
using SdlDotNet.Graphics;
using SdlDotNet.Graphics.Primitives;

namespace SpaceTrader.Core.GameObjects
{
    public class Projectile : GameObject
    {
        public Projectile(int x, int y) : base(x, y)
        {
            ForeColor = Color.Yellow;
            Thrust = 5;
            Throttle = 1;
            MaxSpeed = 10;
        }

        public Projectile(int x, int y, string name) : base(x, y, name)
        {
        }

        public override Surface Render()
        {
            Surface surf = new Surface(30, 30);
            surf.Fill(Color.Red);
            surf.Draw(new Circle(Position, 5), ForeColor, true, true);

            return surf;
        }

        public override string ToString()
        {
            string[] Status = {
                                  Position.ToString(),
                                  Rotation.ToString(),
                                  Thrust.ToString(),
                                  Throttle.ToString()
                              };

            return
                String.Format(
                    GetType().Name.ToString() + " ( Position:{0}, Rotation: {1}, Thrust: {2}, Throttle: {3} )", Status);
        }
    }
}